package com.gragra.wilsHandler.tests;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.StringReader;
import java.io.StringWriter;
import org.junit.Test;
import com.gragra.wilsHandler.WilsToPunctuationFreeWithEvaluateSentences;
/**
 * 
 * @author Christoph Teichmann
 * 24.09.2013
 */
public class TestWilsToPunctuationFreeWithEval
{
	@Test
	public void testMain() throws IOException
	{
		StringBuilder input = new StringBuilder();
		input.append("1	a	yeah	co	ho	PRT	_	0	ROOT\n");
		input.append("1	b	yeah	co	co	PRT	_	1	1\n");
		input.append("1	c	yeah	co	co	.	_	2	1\n");
		input.append("1	d	yeah	co	co	PRT	_	5	1\n");
		input.append("1	e	yeah	co	co	.	_	6	3\n");
		input.append("1	f	yeah	co	co	RR	_	1	4\n");
		input.append("\n");
		input.append("1	g	yeah	co	co	PRT	_	0	ROOT\n");
		input.append("1	h	yeah	co	co	PRT	_	1	1\n");
		input.append("1	i	yeah	co	co	.	_	2	1\n");
		input.append("1	j	yeah	co	co	.	_	3	3\n");
		StringReader sr = new StringReader(input.toString());
		BufferedReader inp1 = new BufferedReader(sr);
		input = new StringBuilder();
		input.append("1	l	yeah	co	co	PRT	_	0	ROOT\n");
		input.append("1	m	yeah	co	co	PRT	_	1	1\n");
		input.append("1	n	yeah	co	co	.	_	2	1\n");
		input.append("1	o	yeah	co	co	.	_	3	3\n");
		sr = new StringReader(input.toString());
		BufferedReader inp2 = new BufferedReader(sr);
		input = new StringBuilder();
		input.append("1	p	yeah	co	co	PRT	_	0	ROOT\n");
		input.append("1	q	yeah	co	co	PRT	_	1	1\n");
		input.append("1	r	yeah	co	co	.	_	2	1\n");
		input.append("1	s	yeah	co	co	.	_	3	3\n");
		input.append("1	t	yeah	co	co	RR	_	4	4\n");
		input.append("\n");
		input.append("1	u	yeah	co	co	PRT	_	0	ROOT\n");
		input.append("1	v	yeah	co	co	PRT	_	1	1\n");
		input.append("1	w	yeah	co	co	.	_	2	1\n");
		input.append("1	x	yeah	co	co	.	_	3	3\n");
		input.append("1	y	yeah	co	co	RR	_	4	4\n");
		sr = new StringReader(input.toString());
		BufferedReader inp3 = new BufferedReader(sr);
		StringWriter sw1 = new StringWriter();
		BufferedWriter bw1 = new BufferedWriter(sw1);
		StringWriter sw2 = new StringWriter();
		BufferedWriter bw2 = new BufferedWriter(sw2);
		StringWriter sw3 = new StringWriter();
		BufferedWriter bw3 = new BufferedWriter(sw3);
		StringWriter sw4 = new StringWriter();
		BufferedWriter bw4 = new BufferedWriter(sw4);
		WilsToPunctuationFreeWithEvaluateSentences.main(bw1, bw2, bw3,bw4, new BufferedReader[] {inp1,inp2,inp3},-1);
		bw1.close();
		bw2.close();
		bw3.close();
		bw4.close();
		System.out.println(sw1.toString());
	}
}